// src\redux\person_reducer.js
// person的reducer
import { ADD_PERSON } from './constant'
const initState = [{ id: "001", name: "Tom", age: 10 }];
export default function personReducer(preState = initState, action) {
    const { type, data } = action;
    console.log(type, data);
    if (type === ADD_PERSON) {
        return [data, ...preState];
    }
    return preState;
}
